#ifndef __CLIENT_H
#define __CLIENT_H

#include "Person.h"
#include "Contact.h"
#include "Account.h"
#include <vector>

class SavingsAccount;
class CurrentAccount;

class Account;

class Transaction;

using namespace std;

class Client : public Person
{

public:
								Client(const string firstName, const  string lastName, 
										int age, eGender gender, const Contact& contact);

								~Client();
	void						setVipStatus(bool isVip);

	int							getId()								const;
	const Account*				getCurrentAccount()					const;
	const SavingsAccount&		getSavingsAccount(int accountId)	const;
	bool						getVipStatus()						const;
	double						getTotalMoney()						const;
	const vector<SavingsAccount*>	getAllSavingsAccounts()				const;

	void					updateCurrentAccount(Account& currentAccount);
	void					addSavingAccount(SavingsAccount* account);
	void					removeSavingAccount(int accountId);
	bool					removeCurrentAccount();
	bool					operator==(const Client& other)		const;

	void					addTransaction(Transaction& transaction);
	
private:
	static int				clientIDGenerator;
	int						clientId;
	Contact					contact;
	bool					isVip;
	double					totalMoney;

	Account*				currentAccount;
	vector<SavingsAccount*>	savingsAccounts;

	int getNextSavingAccountIndex();

	Client(const Client& c);
	void operator=(const Client& other);
	virtual void toOs(ostream& os, bool isFullPrint = true)					const;
};
#endif